<template>
  <div>
    <el-carousel :data="banners">
      <el-carousel-item
        v-for="(item, index) in banners"
        :key="index"
        @click.native="clickHandler(item, index)"
      >
        <a :href="item.url">
          <img :src="item.img" style="width:100%"/>
        </a>
      </el-carousel-item>
    </el-carousel>
  </div>
</template>
<script>
export default {
  props:{
      banners:{
          type:Array,
          required:true
      }
  }
};
</script>

<style>
</style>